{include file="public/header"/}
{include file="public/add_header"/}
<form method="post" class="form-horizontal" action="save" id="layer-form">
    {if condition="$data['id']!=''"}<input type="hidden" value="{$data['id']}" name="id">{/if}
    <!--表单项-->
        
                <div class="form-group">
                    <label class="col-sm-2 control-label">登录名</label>
                    <div class="col-sm-10">
                        {if condition="$data['id']==''"}
                        <input type="text" class="form-control" name="login_name" value="{$data['login_name']}" >
                        {else/}
                        <p class="form-control-static">{$data['login_name']}</p>
                        {/if}
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">用户名</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="user_name" value="{$data['user_name']}" >
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">角色</label>
                    <div class="col-sm-10">
                        {$html
                        ->checkbox(
                        '用户角色',
                        'roles[]',
                        $roles,
                        'id',
                        'name',
                        $data['roles'],
                        true
                        )}
                    </div>
                </div>
                <div class="hr-line-dashed"></div>
    <!--/表单项-->
    {$html->submit_btn()}
</form>
{include file="public/add_footer"/}
{include file="public/footer"/}